});
# and then load all the channel data, moving on if nothing's there.
my $data = load_channel($channel->{filename}, $channel->{xmlurl}); next unless $data;
# if there's nothing in our date_downloaded, then we maybe
# coming from an importing, so we'll skip this feed for now.
next unless $channel->{date_downloaded};
# the channel header. I go through insane amounts
# of effort to make sure the result HTML has perfect
# line spacing and indentation. You certainly don't
# have to mimick my anality. (Moortal KombutTT!).
to_browser(qq{\n});
to_browser(qq{ \n});
to_browser(qq{ \n});
to_browser(qq{ \n\n});
# if there are no channel items, say so.
if ( not defined($data->{item}) or scalar @{$data->{item}} <= 0) {
to_browser(qq{ });
to_browser(qq{\n});
}
# each of the channel items.
foreach my $item (@{$data->{item}}) {
# is mod_content's content:encoded used?
$item->{description} = $item->{"content:encoded"} if defined($item->{"content:encoded"});
# display the actual item.
to_browser(qq{ });
to_browser(qq{\n});
}
# finish the table, both for
# our channel, as well as our
# grey hilighter (whee!).
to_browser(qq{ | \n});
to_browser(qq{ \n});
to_browser(qq{ \n});
to_browser(qq{ \n});
# is there an email address associated with this site?
if ($channel->{email}) { to_browser(qq{ \n}); }
# continue on with the rest of our header.
# we create an encoded 'xmlurl' for our del_url.
# this is so we don't get confused with channel
# query_strings being interpreted as part of our own.
my $encoded_xmlurl = encode_to_dec($channel->{xmlurl});
to_browser(qq{ \n});
to_browser(qq{ \n});
to_browser(qq{  | $channel->{title} Last Downloaded: $channel->{date_downloaded}. |  |  |  | \n});
to_browser(qq{ | | });
to_browser(qq{ This channel has no items that AmphetaDesk can display. });
to_browser(qq{ | | });
to_browser(qq{}) if $item->{link};
to_browser(qq{$item->{title}}) if $item->{title}; to_browser(qq{}) if $item->{link};
to_browser(qq{ $item->{description} }) if $item->{description};
to_browser(qq{ | \n});
to_browser(qq{});
to_browser(qq{ |